package top.kaoshanji.p1ch02b.main;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import top.kaoshanji.p1ch02b.config.ProjectConfig;

/**
 * 代码清单-p1ch02b-32页a：在控制台中打印两个新bean
 * @author kaoshanji
 * ^_^
 * create time 2025/4/27 15:29
 */
public class Main {

    public static void main(String[] args) {

        var context = new AnnotationConfigApplicationContext(ProjectConfig.class);

        Parrot p = context.getBean(Parrot.class);
        System.out.println(p.getName());

        String s = context.getBean(String.class);
        System.out.println(s);

        Integer n = context.getBean(Integer.class);
        System.out.println(n);

    }

}
